/*
 * daemon.h
 *
 *  Created on: 08/mag/2014
 *      Author: kappa
 */


#ifndef DAEMON_H_
#define DAEMON_H_


#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>

#ifdef _WIN32
   #include <windows.h>
#else
	#include <unistd.h>
	#include <fcntl.h>
	#include <syslog.h>	
	#include <sys/stat.h>
	#include <sys/resource.h>
	#include <signal.h>
	#define LOCKFILE "/var/run/pkmailsod.pid"
	#define LOCKMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)
	#define DNAME "pksmsd"
	extern int lockfile(int);
#endif


//void daemonize(const char *);
//int already_running(void);

#endif /* DAEMON_H_ */


